import request from '@/utils/request'

// 查询公共基础字段列表
export function listCommonDataProperty(query) {
  return request({
    url: '/system/commonDataProperty/list',
    method: 'get',
    params: query
  })
}

// 查询公共基础字段详细
export function getCommonDataProperty(id) {
  return request({
    url: '/system/commonDataProperty/' + id,
    method: 'get'
  })
}

// 新增公共基础字段
export function addCommonDataProperty(data) {
  return request({
    url: '/system/commonDataProperty',
    method: 'post',
    data: data
  })
}

// 新增字段判重
export function commonAddRemovingRepeat(nameEn) {
  return request({
    url: '/system/commonDataProperty/commonAddRemovingRepeat/'+nameEn,
    method: 'get'
  })
}

// 修改公共基础字段
export function updateCommonDataProperty(data) {
  return request({
    url: '/system/commonDataProperty',
    method: 'put',
    data: data
  })
}

// 删除公共基础字段
export function delCommonDataProperty(id) {
  return request({
    url: '/system/commonDataProperty/' + id,
    method: 'delete'
  })
}

// 导出公共基础字段
export function exportCommonDataProperty(query) {
  return request({
    url: '/system/commonDataProperty/export',
    method: 'get',
    params: query
  })
}
